﻿<Page
    x:Class="uWPIcons.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:uWPIcons"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" >

    <Page.BottomAppBar>
        <AppBar >   <!--IsSticky="True"> -->
            <StackPanel Orientation="Horizontal" >
                <AppBarButton x:Name="RefreshButton" Icon="Refresh" Click="AppBarButton_Click"/>
                <AppBarButton x:Name="HelpButton"  Icon="Help" Click="AppBarButton_Click"/>
            </StackPanel>
        </AppBar>
    </Page.BottomAppBar>

    <Grid Name="MainGrid" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <FlyoutBase.AttachedFlyout>
            <Flyout>
                <Grid Height="100" Width="100"/>
            </Flyout>
        </FlyoutBase.AttachedFlyout>
        <Grid.RowDefinitions>
            <RowDefinition Height="50"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="50" />
            <RowDefinition Height="50" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="10"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="2*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <Button Grid.Row="0" Grid.Column="1" x:Name="CameraButton"  IsEnabled="True" HorizontalAlignment="Left" Margin="0">
            <Viewbox MaxHeight="40" MaxWidth="40" >
              <SymbolIcon Symbol="Camera"/>
            </Viewbox>
            <Button.Flyout>
                <Flyout>
                    <Flyout.FlyoutPresenterStyle>
                        <Style TargetType="FlyoutPresenter">
                            <Setter Property="ScrollViewer.HorizontalScrollMode" Value="Disabled"/>
                            <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
                            <Setter Property="IsTabStop" Value="True"/>
                            <Setter Property="TabNavigation" Value="Cycle"/>
                        </Style>
                    </Flyout.FlyoutPresenterStyle>
                    <TextBlock TextWrapping="Wrap" Text="Camera Button Pressed."/>
                </Flyout>
            </Button.Flyout>
        </Button>
        <Button Grid.Row="0" Grid.Column="2" x:Name="FlashButton"  IsEnabled="True" HorizontalAlignment="Center">
            <Viewbox MaxHeight="40" MaxWidth="40">
                <SymbolIcon Symbol="SolidStar"/>
            </Viewbox>
            <Button.Flyout>
                <Flyout>
                    <Flyout.FlyoutPresenterStyle>
                        <Style TargetType="FlyoutPresenter">
                            <Setter Property="ScrollViewer.HorizontalScrollMode" Value="Disabled"/>
                            <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
                            <Setter Property="IsTabStop" Value="True"/>
                            <Setter Property="TabNavigation" Value="Cycle"/>
                        </Style>
                    </Flyout.FlyoutPresenterStyle>
                    <TextBlock TextWrapping="Wrap" Text="Flash Button Pressed."/>
                </Flyout>
            </Button.Flyout>
        </Button>
        <Button Grid.Row="0" Grid.Column="3" x:Name="FrontCameraButton" IsEnabled="True" HorizontalAlignment="Right">
            <Viewbox MaxHeight="40" MaxWidth="40">
                <SymbolIcon Symbol="RotateCamera"/>
            </Viewbox>
            <Button.Flyout>
                <Flyout>
                    <Flyout.FlyoutPresenterStyle>
                        <Style TargetType="FlyoutPresenter">
                            <Setter Property="ScrollViewer.HorizontalScrollMode" Value="Disabled"/>
                            <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
                            <Setter Property="IsTabStop" Value="True"/>
                            <Setter Property="TabNavigation" Value="Cycle"/>
                        </Style>
                    </Flyout.FlyoutPresenterStyle>
                    <TextBlock TextWrapping="Wrap" Text="Selfie Button Pressed."/>
                </Flyout>
            </Button.Flyout>
        </Button>
        <TextBlock Grid.Row="1" Grid.Column="1" Text="Rear"     HorizontalAlignment="Left" Margin="0" />

        <TextBlock Grid.Row="1" Grid.Column="2" Text="Flash"    HorizontalAlignment="Center" />

        <TextBlock Grid.Row="1" Grid.Column="3" Text="Selfie"   HorizontalAlignment="Right" />


        <RadioButton Grid.Row="2" Grid.Column="1"  x:Name="Yes" GroupName="Outcome" Content="Yes" Checked="Decision_Checked" />
        <RadioButton Grid.Row="2" Grid.Column="2"  x:Name="No" GroupName="Outcome" Content="No"  Checked="Decision_Checked" />
        <RadioButton Grid.Row="2" Grid.Column="3"  x:Name="Unknown" GroupName="Outcome" Content="Unknown" Checked="Decision_Checked"/>
        <Viewbox MaxHeight="20" MaxWidth="20" Grid.Row="2" Grid.Column="4"  VerticalAlignment="Center">
            <SymbolIcon Symbol="{Binding Icon2, Mode=OneWay}"/>
        </Viewbox>



        <Button x:Name="Prev" Grid.Row="3" Content="Prev" Grid.Column="1" Tapped="Prev_Tapped"/>
        <Viewbox MaxHeight="20" MaxWidth="20" Grid.Row="3" Grid.Column="2"  VerticalAlignment="Center">
            <SymbolIcon Symbol="{Binding Icon1, Mode=OneWay}"/>
        </Viewbox>
        <TextBlock x:Name="tb" Grid.Row="3"  Grid.Column="3" Text ="{Binding Icon1Name, Mode=OneWay}" VerticalAlignment="Center"/>
        <TextBlock x:Name="tc" Grid.Row="3"  Grid.Column="4" Text ="{Binding Icon1Value, Mode=OneWay}" VerticalAlignment="Center"/>
        <Button x:Name="Next" Grid.Row="3" Content="Next" Grid.Column="5" Tapped="Next_Tapped"/>

        <ListBox Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="3"  
                x:Name="ListIconz"
                ItemsSource="{Binding}" 
                DataContext = "MainPage.EnumArrayProp"
                SelectionChanged="ListIconz_SelectionChanged"
                ScrollViewer.IsScrollInertiaEnabled="True"
								ScrollViewer.VerticalScrollMode="Enabled"
								ScrollViewer.VerticalScrollBarVisibility="Visible"
								ScrollViewer.IsVerticalRailEnabled="True"
								ScrollViewer.HorizontalScrollMode="Disabled"
								ScrollViewer.IsHorizontalRailEnabled="False"
								ScrollViewer.HorizontalScrollBarVisibility="Disabled"

								HorizontalAlignment="Left"
								VerticalAlignment="Top"
								Height="300"
                                Width="Auto"
								Padding="0" 
                 >
            <ListBox.ItemContainerStyle>
                <Style TargetType="ListBoxItem">
                    <Setter Property="Padding" Value="0"/>
                    <Setter Property="Margin" Value="0"/>
                </Style>
            </ListBox.ItemContainerStyle>
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <!-- TextBlock x:Name="ASD" Text="{Binding Num , Mode=OneWay}" /> -->
                   <Viewbox MaxHeight="30" MaxWidth="30">
                        <SymbolIcon Symbol="{Binding}"/>
                    </Viewbox> 
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
    </Grid>
</Page>
